local VideoRecorder = class("VideoRecorder")


function VideoRecorder:ctor()
	self._api = nil
	if (device.platform=="ios") then
		self._api = require("app.public.recorder.WeRecAPI_IOS")
	elseif (device.platform=="android") then
		--self._api = require("app.public.recorder.WeRecAPI_Android") 
	end
end

function VideoRecorder:isValid()
	local api = self._api
	if not api then
		print("VideoRecorder not valid on this platform")
		return false
	end
	return api:apiAvailable()
end

function VideoRecorder:showToolbar()
	if self:isValid() then
		self._api:showToolbar()
	end
end


function VideoRecorder:hideToolbar()
	if self:isValid() then
		self._api:hideToolbar()
	end
end

function VideoRecorder:isToolbarVisible()
	if self:isValid() then
		return self._api:isToolbarVisible()
	end
end

return VideoRecorder